package com.color.admin.common.logger.service;

import com.color.admin.common.core.result.ResultData;
import com.color.admin.log.controller.LogController;
import com.color.admin.log.entity.SysLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @author HaiQiu
 * @date 2022/1/27
 */
@Service
public class LogService {

    @Autowired
    private LogController logController;

    @Async
    public void save(SysLog sysLog){
        ResultData resultData = logController.save(sysLog);
        if (!resultData.getSuccess()){
            System.out.println(resultData.getMsg());
        }
    }

}
